home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Science⁄Math / VideoToolbox / VideoToolboxSources / GDInfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-29  |  2.6 KB  |  77 lines  |  [TEXT/KAHL]

  1. /*
  2. GDInfo.h
  3.  
  4. This structure is used by GDInfo.c, GDTestClut.c, and TimeVideo.c. The intent is
  5. to allow the test routines to accumulate all the test information in one
  6. convenient VideoInfo record that TimeVideo can then intelligently summarize in
  7. a useful report. All the information in the structures is stable, except the
  8. depth index "d". Call GDInfo() to update d after each call to SetDepth. 
  9.  
  10. */
  11.  
  12. typedef struct {
  13.     // filled in by GDTestClut.c
  14.     struct{
  15.         short doTest;
  16.         short tested;
  17.         short errors;                // error exceeded tolerance
  18.         short errorsAtOnce;            // ", when we loaded whole clut at once
  19.         double rgbGain[3][3];        // linear model for clut write-read transformation 
  20.         double rgbError[3];            // rms error of that linear model
  21.         double rgbErrorAtOnce[3];    // ", when we loaded whole clut at once
  22.         double tolerance;            // criterion used for calling a clut bad
  23.         Boolean identity;            // gains correspond to identity transform, i.e. color mode
  24.     }read;
  25.     // filled in by GDTestClutHash in GDTestClut.c
  26.     struct{
  27.         short doTest;
  28.         short tested;
  29.         short errors;
  30.     }hash;                        // visible artifacts during clut loading
  31.     // filled in by GDTestClutVisually in GDTestClut.c
  32.     struct{
  33.         short doTest;
  34.         short tested;
  35.         short errors;
  36.         short errorsAtOnce;
  37.     }visual;                    // vs standard flags==0 cond.
  38. }VideoCardClutTest;
  39.  
  40. typedef struct {
  41.     GDHandle device;
  42.     Boolean basicTested,timeTested,clutTested;    // What's been tested.
  43.     // basicTest: these are filled in by GDInfo.c
  44.     Boolean setEntriesQuickly,gdGetEntries;        // compatibility
  45.     char cardName[100],driverName[100];
  46.     short slot,width,height,dacSize,dacMask;
  47.     struct{
  48.         short pixelSize;                        // zero if mode is invalid
  49.         short mode,clutSize,pages;
  50.         // timeTest: these are filled in by GDInfoTime in GDInfo.c
  51.         short timeTested;
  52.         double frameRate,vblPerFrame;
  53.         double movieRate,movieRateQuickly;
  54.         double framesPerClutUpdate,framesPerClutUpdateHighPriority
  55.             ,framesPerClutUpdateQuickly;
  56.         double missingFramesPerClutUpdate,missingFramesPerClutUpdateHighPriority
  57.             ,missingFramesPerClutUpdateQuickly;
  58.         // These are filled in by GDTestClut.c
  59.         VideoCardClutTest clut[2][2];            // [quickly][isGray]
  60.     } depth[6];                                    // Indexed by d.
  61.     short d;                                    // current depth index
  62. } VideoInfo;
  63.  
  64. // GDInfo.c
  65. OSErr GDInfo(VideoInfo *card);
  66. OSErr GDInfoTime(VideoInfo *card);
  67.  
  68. // GDTestClut.c
  69. OSErr GDTestClut(FILE *o[2],short flags,VideoInfo *card);
  70. OSErr GDTestClutVisually(short flags,VideoInfo *card);
  71. OSErr SetEntriesQuicklyVsGDSetEntries(VideoInfo *card);
  72. OSErr GDTestClutHash(short flags,VideoInfo *card);
  73.  
  74. enum{testClutQuicklyFlag=1,testClutSeriallyFlag=2
  75.     ,testClutNegativeFlag=4,testClutLinearFlag=8
  76.     ,testClutVisually=16,testClutGains=32};
  77.